home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
CC_C
/
3273.ZIP
/
VGAKIT52.ZIP
/
VGAKIT.DOC
< prev
next >
Wrap
Text File
|
1992-10-22
|
10KB
|
363 lines
VGAKIT Version 5.2b
Here is my latest SVGA/VGA info pack. I've included the .OBJ versions in case
anyone who does not have an assembler wants to play with these routines.
5.0 Changes:
Support for VESA defined line widths, and correct support for bank sizes other
than 64k. Old versions of VGAKIT would adjust all bank boundries to 64k by
shifting up the bank numbers on cards that have 4k or 16k banks. To correct
this I've changed the code to use an address table for screen offsets and
bank numbers, this is very close to what I do in my own graphics code. To
simplify things I've made the address table a fixed array that supports up
to 1024 scanlines. In a real program I would probably allocate this array
at runtime using malloc or some similar memory allocation function.
5.2 Changes:
New VESA memory detect
VESA 1.2 support
Memory detect for Tseng3000
DAC Type call added
More accurate Tseng4000 detect
5.2b Changes:
DAC detect call for Tseng4000 boards would hang many other boards
now it is only made on Tseng4000 boards
MKADRTBL function would not handle bank sizes less than 64k correctly
VESASET function would not get the bank size correctly (it was using Winsize
instead of WinGranularity
John Bridges 10/22/1992
Compuserve ID: John Bridges [GRASP] 75300,2137
Internet: 75300.2137@compuserve.com (John Bridges)
I can be found regularly in the GRAPHVEN forum on Compuserve (where GRASP is
supported), as well as the GRAPHSUP forum (formally called PICS).
-------------------------------------------------------------------------------
The included modules are:
EXAMPLE.C is a silly C program which shows that this code works,
it just plots a nice calculated pattern using the
point functions.
MKEXAMP.BAT batch file to compile and link EXAMPLE.C into EXAMPLE.EXE
for Microsoft C 6.0
STICKS.C is another silly C program which shows that this code works,
it uses the line function to draw a LOT of lines to make a
very nice complex weave type pattern. Amazing how complex the
image gets from such a trivial program.
MKSTICKS.BAT batch file to compile and link STICKS.C into STICKS.EXE
for Microsoft C 6.0
BANKS.ASM SVGA bank switch code, used to address the beyond 64k
addressing sceams of the various SVGA chipsets. Also
includes a global variable "curbk" which is the current
hardware bank number which can be checked before each
bank switch to prevent the extra overhead of switching
into a currently selected bank. An example of this is
in the point routine in POINT.ASM which only switches
memory banks when required.
BANKS.ASM includes the global variables ativga,tseng, tseng4
trident,video7,everex,paradise,chipstech, aheada, aheadb,
oaktech and vgamem. These variables are set by the WHICHVGA()
function which must be called at program startup time to
determine which SVGA (if any) you have installed. This
function returns a 1 (true) if you have a SVGA card installed.
MODE13X.ASM Is the function to setup the non-standard (ie: not supported
by the BIOS) 360x480x256 mode, this mode works on virtually
VGA that is fully IBM compatable. It's a great mode for
those without SVGA capabilities.
SVGAMODE.ASM Is a limited function which sets up 640x480x256 color
mode on a SVGA, it uses the global chipset flags to
determine the BIOS mode number.
POINT.ASM Is a pair of simple point plotting functions,
point(xpos,ypos,color)
which plots a point at x,y coorinates xpos,ypos in SVGA
modes calling newbank() in BANKS.ASM to switch memory
banks when necessary.
point13x(xpos,ypos,color)
which plots a point at x,y coorinates xpos,ypos in 360x480
mode. Both point functions will clip at screen boundries
correctly.
XPOINT.ASM Is just like POINT.ASM except that it's point functions draw
the points XOR'd to the screen.
xpoint(xpos,ypos,color)
xpoint13x(xpos,ypos,color)
RDPOINT.ASM Is just like POINT.ASM except that instead of plotting points
it reads the color of screen pixel.
color=rdpoint(xpos,ypos)
color=rdpoint13x(xpos,ypos)
LINE.ASM Is a line plotting function callable from C, you pass it the
coordinates for the two end points of the line, the color to
draw the line in and the function to call to plot each point.
bline(x1,y1,x2,y2,color,xpoint);
here is a list of VGA Chipset producers and their BIOS mode numbers:
=======================================================
ACUMOS
------
width height colors
----- ------ ------
0x59 800 600 2
0x58 800 600 16
0x5e 640 400 256
0x5f 640 480 256
0x5c 800 600 256
0x5d 1024 768 16
AX=MODE
=======================================================
AHEAD
-----
width height colors
----- ------ ------
0x6A 800 600 16
0x71 800 600 16
0x74 1024 768 16
0x60 640 400 256
0x61 640 480 256
0x62 800 600 256
0x63 1024 768 256
AX=MODE
=======================================================
ATI
---
width height colors
----- ------ ------
0x54 800 600 16
0x65 1024 768 16
0x61 640 400 256
0x62 640 480 256
0x63 800 600 256
0x64 1024 768 256
AX=MODE
=======================================================
CHIPS & TECH
------------
width height colors
----- ------ ------
0x70 800 600 16
0x72 1024 768 16
0x78 640 400 256
0x79 640 480 256
0x7b 800 600 256
AX=MODE
=======================================================
EVEREX
------
width height colors
----- ------ ------
0x01 752 410 16
0x02 800 600 16
0x11 1280 350 4
0x12 1280 600 4
0x13 640 350 256
0x14 640 400 256
0x15 512 480 256
0x20 1024 768 16
0x30 640 480 256
0x31 800 600 256
0x32 1024 768 256
AX=0x70 BL=MODE
=======================================================
GENOA GVGA
----------
width height colors
----- ------ ------
0x7c 512 512 16
0x59 720 512 16
0x79 or 0x6a 800 600 16
0x7d 512 512 256
0x5b 640 350 256
0x7e 640 400 256
0x5c 640 480 256
0x5d 720 512 256
0x5e or 0x6c 800 600 256
0x7f 1024 768 4
0x5f 1024 768 16
AX=MODE
=======================================================
NCR
---
width height colors
----- ------ ------
0x59 800 600 2
0x58 800 600 16
0x5e 640 400 256
0x5f 640 480 256
0x5c 800 600 256
0x5a 1024 768 2
0x5d 1024 768 16
AX=MODE
=======================================================
OAK TECH
--------
width height colors
----- ------ ------
0x52 800 600 16
0x53 640 480 256
0x54 800 600 256
0x56 1024 768 16
0x59 1024 768 256
0x58 1280 1024 16
AX=MODE
=======================================================
PARADISE
--------
width height colors
----- ------ ------
0x59 800 600 2
0x58 800 600 16
0x5e 640 400 256
0x5f 640 480 256
0x5d 1024 768 16
0x5c 800 600 256
AX=MODE
=======================================================
TRIDENT
-------
width height colors
----- ------ ------
0x5b 800 600 16
0x5f 1024 768 16
0x5c 640 400 256
0x5d 640 480 256
0x5e 800 600 256
AX=MODE
=======================================================
TRIDENT 8900
------------
width height colors
----- ------ ------
0x5b 800 600 16
0x5c 640 400 256
0x5d 640 480 256
0x5e 800 600 256
0x60 1024 768 4
0x5f 1024 768 16
0x62 1024 768 256
AX=MODE
=======================================================
TSENG (Genoa, Orchid, Willow)
-----
width height colors
----- ------ ------
0x29 800 600 16
0x37 1024 768 16
0x2d 640 350 256
0x2e 640 480 256
0x2f 720 512 256
0x30 800 600 256
AX=MODE
=======================================================
TSENG 4000
----------
width height colors
----- ------ ------
0x29 800 600 16
0x37 1024 768 16
0x2d 640 350 256
0x2f 640 400 256
0x2e 640 480 256
0x30 800 600 256
0x38 1024 768 256
AX=MODE
=======================================================
VIDEO7
------
width height colors
----- ------ ------
0x60 752 410 16
0x61 720 540 16
0x62 800 600 16
0x63 1024 768 2
0x64 1024 768 4
0x65 1024 768 16
0x66 640 400 256
0x67 640 480 256
0x68 720 540 256
0x69 800 600 256
0x6A 1024 768 256
AX=0x6f05 BL=MODE
=======================================================